package com.luck.easyfoodbatch.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by DJMoving on 2017/4/22 0022.
 */

public class Type implements Parcelable{
    private int id;
    private String typename;
    private String typeiconurl;

    public Type(int id, String typename, String typeiconurl) {
        super();
        this.id = id;
        this.typename = typename;
        this.typeiconurl = typeiconurl;
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTypename() {
        return typename;
    }

    public void setTypename(String typename) {
        this.typename = typename;
    }

    public String getTypeiconurl() {
        return typeiconurl;
    }

    public void setTypeiconurl(String typeiconurl) {
        this.typeiconurl = typeiconurl;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
      dest.writeInt(id);
        dest.writeString(typename);
        dest.writeString(typeiconurl);
    }
    protected Type(Parcel in){
        id=in.readInt();
        typename=in.readString();
        typeiconurl=in.readString();
    }
    public static final Parcelable.Creator<Type> CREATOR=new Creator<Type>() {
        @Override
        public Type createFromParcel(Parcel in) {
            return new Type(in);
        }

        @Override
        public Type[] newArray(int size) {
            return new Type[size];
        }
    };
}
